package com.danco.training.hoteladmin.storage;

import java.util.Comparator;
import com.danco.training.hoteladmin.core.Room;

 class RoomSortByPrice implements Comparator<Room>{
	@Override
	public int compare(Room o1, Room o2) {		
		if(o1.getRoomPrice() > o2.getRoomPrice()) {
           return 1;
		}
		else if(o1.getRoomPrice() < o2.getRoomPrice()) {
           return -1;
		}
		else {
           return 0;
		}
	}
}
